package com.example.clxy.dao;

import com.example.clxy.entity.Adjustschedule;
import com.example.clxy.result.business.AdjustScheduleResult;
import com.example.clxy.result.business.PageResult.AdjustSchedulePageResult;
import com.example.clxy.result.business.PageResult.WorkableAdjustSchedulePageResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdjustscheduleMapper {
    int deleteByPrimaryKey(String adjustclassid);

    int insert(Adjustschedule record);

    int insertSelective(Adjustschedule record);

    Adjustschedule selectByPrimaryKey(String adjustclassid);

    int updateByPrimaryKeySelective(Adjustschedule record);

    int updateByPrimaryKey(Adjustschedule record);

    int selectAdjustSchedule(@Param("studentid") String studentid,
                             @Param("oldscheduleid") String oldscheduleid,
                             @Param("newscheduleid") String newscheduleid);

    int selectDuplicateSchedule(@Param("studentid") String studentid,
                                @Param("oldscheduleid") String oldscheduleid);

    List<AdjustSchedulePageResult> getAdjustSchedule(@Param("teacherid") String teacherid,
                                                     @Param("studentid") String studentid,
                                                     @Param("adjuststate") String adjuststate,
                                                     @Param("begin") int begin,
                                                     @Param("end") int end,
                                                     @Param("pagesize") int pagesize);


    List<WorkableAdjustSchedulePageResult> getWorkableAdjustSchedule(@Param("scheduleid") String scheduleid,
                                                                     @Param("nowDate") String nowDate,
                                                                     @Param("startDate") String startDate,
                                                                     @Param("endDate") String endDate,
                                                                     @Param("begin") int begin,
                                                                     @Param("end") int end,
                                                                     @Param("pagesize") int pagesize);

    AdjustScheduleResult getAdjustByScheduleid(@Param("adjustclassid") String adjustclassid);
}